<?php
/**
 * Created By PhpStorm
 * Author: patrick wu
 * Date: 2020/9/22
 * Time: 17:01
 */
namespace App\Http\Model\Mysql;

use Illuminate\Database\Eloquent\Model;

class AttributeModel extends Model
{
    protected $table    =   'mini_attribute';

    protected $guarded  =   [];

    protected $dateFormat   =   'U';

    /**
     * 定义链接多属性值表
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function values()
    {
        return $this->hasMany(AttributeValueModel::class, 'attr_id', 'id');
    }
}
